package simorg.controller;

import java.util.HashMap;

import simorg.actions.Action;

public abstract class Controller {

	protected String name;
	protected HashMap<String, Action> actions;
	protected Action defaultAction;
	
	
	public String getName() {
		return name;
	}


	public Action getActionHandler(String operation) {
		Action a = this.actions.get(operation);
		return (a==null)?defaultAction:a;
	}
}
